Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

The set Q consists of the following terms:

app(app(twice, x0), x1)
app(app(map, x0), nil)
app(app(map, x0), app(app(cons, x1), x2))
app(app(fmap, nil), x0)
app(app(fmap, app(app(cons, x0), t_f)), x1)


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

APP(app(fmap, app(app(cons, f), t_f)), x) → APP(f, x)
APP(app(twice, f), x) → APP(f, x)
APP(app(map, f), app(app(cons, h), t)) → APP(app(cons, app(f, h)), app(app(map, f), t))
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(app(cons, app(f, x)), app(app(fmap, t_f), x))
APP(app(map, f), app(app(cons, h), t)) → APP(f, h)
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(fmap, t_f)
APP(app(map, f), app(app(cons, h), t)) → APP(app(map, f), t)
APP(app(twice, f), x) → APP(f, app(f, x))
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(app(fmap, t_f), x)
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(cons, app(f, x))
APP(app(map, f), app(app(cons, h), t)) → APP(cons, app(f, h))

The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

The set Q consists of the following terms:

app(app(twice, x0), x1)
app(app(map, x0), nil)
app(app(map, x0), app(app(cons, x1), x2))
app(app(fmap, nil), x0)
app(app(fmap, app(app(cons, x0), t_f)), x1)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(fmap, app(app(cons, f), t_f)), x) → APP(f, x)
APP(app(twice, f), x) → APP(f, x)
APP(app(map, f), app(app(cons, h), t)) → APP(app(cons, app(f, h)), app(app(map, f), t))
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(app(cons, app(f, x)), app(app(fmap, t_f), x))
APP(app(map, f), app(app(cons, h), t)) → APP(f, h)
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(fmap, t_f)
APP(app(map, f), app(app(cons, h), t)) → APP(app(map, f), t)
APP(app(twice, f), x) → APP(f, app(f, x))
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(app(fmap, t_f), x)
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(cons, app(f, x))
APP(app(map, f), app(app(cons, h), t)) → APP(cons, app(f, h))

The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

The set Q consists of the following terms:

app(app(twice, x0), x1)
app(app(map, x0), nil)
app(app(map, x0), app(app(cons, x1), x2))
app(app(fmap, nil), x0)
app(app(fmap, app(app(cons, x0), t_f)), x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(fmap, app(app(cons, f), t_f)), x) → APP(f, x)
APP(app(twice, f), x) → APP(f, x)
APP(app(map, f), app(app(cons, h), t)) → APP(app(cons, app(f, h)), app(app(map, f), t))
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(app(cons, app(f, x)), app(app(fmap, t_f), x))
APP(app(map, f), app(app(cons, h), t)) → APP(f, h)
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(fmap, t_f)
APP(app(twice, f), x) → APP(f, app(f, x))
APP(app(map, f), app(app(cons, h), t)) → APP(app(map, f), t)
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(app(fmap, t_f), x)
APP(app(map, f), app(app(cons, h), t)) → APP(cons, app(f, h))
APP(app(fmap, app(app(cons, f), t_f)), x) → APP(cons, app(f, x))

The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

The set Q consists of the following terms:

app(app(twice, x0), x1)
app(app(map, x0), nil)
app(app(map, x0), app(app(cons, x1), x2))
app(app(fmap, nil), x0)
app(app(fmap, app(app(cons, x0), t_f)), x1)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 6 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
QDP
                  ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(fmap, app(app(cons, f), t_f)), x) → APP(f, x)
APP(app(twice, f), x) → APP(f, x)
APP(app(map, f), app(app(cons, h), t)) → APP(f, h)
APP(app(map, f), app(app(cons, h), t)) → APP(app(map, f), t)
APP(app(twice, f), x) → APP(f, app(f, x))

The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

The set Q consists of the following terms:

app(app(twice, x0), x1)
app(app(map, x0), nil)
app(app(map, x0), app(app(cons, x1), x2))
app(app(fmap, nil), x0)
app(app(fmap, app(app(cons, x0), t_f)), x1)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


APP(app(fmap, app(app(cons, f), t_f)), x) → APP(f, x)
APP(app(twice, f), x) → APP(f, x)
APP(app(map, f), app(app(cons, h), t)) → APP(f, h)
APP(app(twice, f), x) → APP(f, app(f, x))
The remaining pairs can at least be oriented weakly.

APP(app(map, f), app(app(cons, h), t)) → APP(app(map, f), t)
Used ordering: Combined order from the following AFS and order.
APP(x1, x2)  =  APP(x1)
app(x1, x2)  =  app(x1, x2)
fmap  =  fmap
cons  =  cons
t_f  =  t_f
twice  =  twice
map  =  map
nil  =  nil

Lexicographic Path Order [19].
Precedence:
fmap > APP1 > [app2, twice, map]
fmap > tf > cons > [app2, twice, map]
nil > [app2, twice, map]


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
QDP
                      ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(map, f), app(app(cons, h), t)) → APP(app(map, f), t)

The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

The set Q consists of the following terms:

app(app(twice, x0), x1)
app(app(map, x0), nil)
app(app(map, x0), app(app(cons, x1), x2))
app(app(fmap, nil), x0)
app(app(fmap, app(app(cons, x0), t_f)), x1)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

MAP(f, cons(h, t)) → MAP(f, t)

R is empty.
The set Q consists of the following terms:

twice(x0, x1)
map(x0, nil)
map(x0, cons(x1, x2))
fmap(nil, x0)
fmap(cons(x0, t_f), x1)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP(app(map, f), app(app(cons, h), t)) → APP(app(map, f), t)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
MAP(x1, x2)  =  MAP(x2)
cons(x1, x2)  =  cons(x2)

Lexicographic Path Order [19].
Precedence:
cons1 > MAP1


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ QDPOrderProof
QDP
                          ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(twice, f), x) → app(f, app(f, x))
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, h), t)) → app(app(cons, app(f, h)), app(app(map, f), t))
app(app(fmap, nil), x) → nil
app(app(fmap, app(app(cons, f), t_f)), x) → app(app(cons, app(f, x)), app(app(fmap, t_f), x))

The set Q consists of the following terms:

app(app(twice, x0), x1)
app(app(map, x0), nil)
app(app(map, x0), app(app(cons, x1), x2))
app(app(fmap, nil), x0)
app(app(fmap, app(app(cons, x0), t_f)), x1)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.